/*
  FileName : RTC.h
  Desciption : This is the RTC header file.
  Created on 2007.9.12 by ZZP.

  Revision History:

*/

#ifndef __RTC_H__
#define __RTC_H__

//#include "Dsp281x_Device.h"
#include <std.h>

//FM3104 Register 0: Control/flag
#define FM_CTRL_CF       0x40
#define FM_CTRL_CAL      0x04
#define FM_CTRL_W        0x02
#define FM_CTRL_R        0x01

//FM3104 register 1: Calibrate
#define FM_CAL_OSCEN     0x80
#define FM_CAL_SIGN      0x20
#define FM_CAL_BIT4      0x10
#define FM_CAL_BIT3      0x08
#define FM_CAL_BIT2      0x04
#define FM_CAL_BIT1      0x02
#define FM_CAL_BIT0      0x01

//FM3104 register 2- : 

extern ALL_TIME AllTime;

///////////////////////////////////////////////////////////////
//         Global function prototypes define
///////////////////////////////////////////////////////////////
extern void Clk_GetCalParam(void);
extern void Clk_SetCalParam(void);
extern Uns Clk_CheckCalParam(void);
extern Uns Clk_GetMode(void);
extern void Clk_SetMode(void);
extern Uns Clk_GetRegData(Uns RegAddr);
extern Uns Clk_SetRegData(Uns RegAddr, Uns Data);
extern Uns Clk_GetTime(DATE_TIME_INFO *Time);
extern void Clk_SetTime(DATE_TIME_INFO *Time);
extern void Clk_Calibrate(Uns Cal);
extern void Clk_GetSysParams(void);
extern void Clk_SaveSysParams(void);
extern Uns Clk_CheckSysParams(void);
extern Uns Clk_GetPosParam(void);
extern void Clk_SavePosParam(void);
extern void Clk_SaveLastSts(Uns *Data, Uns DataIndex);
extern void Clk_GetLastSts(Uns *Buf);

extern CALIB_PARAM CalibParam;







#endif


//End of file
